import { prefix } from '../utils/constants'

import userRouter from './module/user'
import adimRouter from './module/admin'
import teacherRouter from './module/teacher'
import studentRouter from './module/student'
import roleMenusRouter from './module/roleMenus'
import messageRouter from './module/message'
import fridendRouter from './module/friend'
import collegeRouter from './module/college'
import classesRouter from './module/classes'
import majorRouter from './module/major'
import courseRouter from './module/course'
import systemFunctionRouter from './module/systemFunction'
import noticesRouter from './module/notices'
import selectLessonRouter from './module/selectLesson'
import selectHistoriesRouter from './module/selectHistories'

// 挂载路由
export default function useRouter(app: any) {
  app.use(`${prefix}/user`, userRouter)
  app.use(`${prefix}/admin`, adimRouter)
  app.use(`${prefix}/teacher`, teacherRouter)
  app.use(`${prefix}/student`, studentRouter)
  app.use(`${prefix}/menus`, roleMenusRouter)
  app.use(`${prefix}/message`, messageRouter)
  app.use(`${prefix}/friend`, fridendRouter)
  app.use(`${prefix}/college`, collegeRouter)
  app.use(`${prefix}/classes`, classesRouter)
  app.use(`${prefix}/major`, majorRouter)
  app.use(`${prefix}/course`, courseRouter)
  app.use(`${prefix}/system`, systemFunctionRouter)
  app.use(`${prefix}/notices`, noticesRouter)
  app.use(`${prefix}/selectlesson`, selectLessonRouter)
  app.use(`${prefix}/histories`, selectHistoriesRouter)
}